<?php

/* 视频 */
namespace app\appapi\controller;

use cmf\controller\HomeBaseController;
use think\facade\Db;

class VideoController extends HomebaseController{

	public function share() {

        $data = $this->request->param();
        $id=checkNull($data['id']);
        
        $info=Db::name('video')->where("id='{$id}'")->find();
        if(!$info){
            $reason=lang('信息错误');
			$this->assign('reason', $reason);
			return $this->fetch(':error');
        }
        
        if($info['status']!=1){
            $reason=lang('信息错误');
			$this->assign('reason', $reason);
			return $this->fetch(':error');
        }
        
        
        $info['thumb']= get_upload_path($info['thumb']);
        $info['href']= get_upload_path($info['href']);
        $this->assign('info', $info);
        $this->assign('hls', $info['href']);
        
        $liveinfo=getUserInfo($info['uid']);

        $this->assign('liveinfo', $liveinfo);
        
        return $this->fetch();
	}	
    

	

}